import React from 'react'
import {
  View,
  Text,
  StyleSheet
} from 'react-native';
import colors from '../../config/colors';

class SectionHeader extends React.Component {
  render() {
    return (
      <View style={[styles.headerContainerStyle, !this.props.title && styles.noneStyle]}>
        <Text style={styles.headerTextStyle}>{this.props.title}</Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  headerContainerStyle: {
    flexDirection: 'row',
    alignItems: 'center',
    backgroundColor: colors.grey8,
    height: 26,
    paddingLeft: 10  
  },
  headerTextStyle: {
    color: colors.grey7,
    fontWeight:'700',
    fontSize:16
  },
  noneStyle: {
    display: 'none'
  }
})

export default SectionHeader;